package com.example.zhyq.fgViewModel

import androidx.lifecycle.MutableLiveData
import com.example.base.entity.AnnouncementsBean
import com.example.base.mvvm.BaseViewModel
import com.example.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import retrofit2.http.Query
import javax.inject.Inject

@HiltViewModel
class HomeViewModel @Inject constructor(val apiService: ApiService): BaseViewModel() {

    val getAnnouncementSuc = MutableLiveData<AnnouncementsBean>()

    fun getAnnouncement(page:Int,size:Int){
        httpRequest({apiService.getAnnouncements(page, size)},{getAnnouncementSuc.postValue(it)})
    }
}